<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>爱心日食</title>
    <meta content="实战" name="keywords">
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        html, body {
            height: 100%;
        }

        body {
            display: grid;
            background-color: #0d3349;
            animation: atmosphere 6s linear infinite;
        }

        .content {
            position: relative;
            margin: auto;
        }

        .content.love {
            position: relative;
            width: 200px;
            height: 180px;
        }

        .love:before,
        .love:after {
            position: absolute;
            width: 100px;
            height: 150px;
            background-color: #00b3ee;
            border-radius: 50px 50px 0 0;
        }

        .love:before {
            content: '伪元素1';
            left: 32px;
            /*变形旋转45°*/
            teansform: rotate(-45deg);
        }

        .love:after {
            content: '伪元素2';
            left: 68px;
            transform: rotate(45deg);
        }

        .love:nth-of-type(2) {
            /*伪类选择器*/
            position: absolute;
            top: 0;
            left: 200px;
            animation: intercept 6s linear infinite;
        }

        .love:nth-of-type(2)::before,
        .love:nth-of-type(2)::after {
            background-color: skyblue;
            animation: intercept 6s linear infinite;
        }

        @keyframes intercept {
            0% {
                left: 200px;
            }
            100% {
                left: -200px;
            }
        }

        @keyframes atmosphere {
            0% {
                background-color: skyblue
            }
            50% {
                background-color: black
            }
            100% {
                background-color: skyblue
            }
        }
    </style>
</head>
<body>
<div class="content">
    <div class="love"></div>
    <div class="love"></div>
</div>
</body>
</html>